// projectpath		项目路径
// outputpath		输出路径
// type 0 数据+纹理 1图片 2序列帧
// datatype         spine
const spwan = require('./lib/spawn')
// https://bbs.egret.com/thread-28556-1-1.html
// 此功能还未实现

// yuanwenjian\juming
module.exports = function(source, target) {
    let projectpath = 'G:/roll_art/donghua/yuanwenjian/juming/juming.dbproj';
    let outputpath = 'G:/test';
    let commond = ["export", "projectpath", projectpath, "outputpath", outputpath, "datatype", "spine", "type", 0]
    spwan("DragonBonesPro.exe", commond)
}

// DragonBonesPro export projectpath="G:/roll_art/donghua/yuanwenjian/bus/wanjuche/wanjuche.dbproj" outputpath="G:/test" outputsetting="G:/test/test.json" type="0" datatype="spine"
DragonBonesPro export projectpath="G:/roll_art/donghua/yuanwenjian/bus/wanjuche/wanjuche.dbproj" type="0" datatype="spine"
// egret 目前不支持的吧

//  const { spawn } = require('child_process');
//  spawn("DragonBonesPro.exe");
//  return;
// function exec(command, param, options) {
//     const p = spawn(command, param, options);
//     p.stdout.on('data', (e) => {
//         console.log("out:", command, e.toString());
//     });
//     p.stderr.on('data', (e) => {
//         console.log("error:", command, e.toString());
//     });
//     p.on('close', (e) => {
//         console.log("close:", e);
//         // cb();
//     });
//     return p;
// }
